import request from '@/utils/request'

export function getRoutes() {
  return request({
    url: '/web/user',
    method: 'post',
    data: { eventId: 3 }
  })
}

export function getRoles() {
  return request({
    url: '/web/user',
    method: 'post',
    data: { eventId: 2 }
  })
}

export function addRole(data) {
  return request({
    url: '/web/user',
    method: 'post',
    data: { eventId: 5, para: data }
  })
}

export function updateRole(role) {
  return request({
    url: '/web/user',
    method: 'post',
    data: { eventId: 4, para: role }
  })
}

export function deleteRole(role) {
  return request({
    url: '/web/user',
    method: 'post',
    data: { eventId: 6, para: role }
  })
}
